package com.bjtu.laorenyouhao.event.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.bjtu.common.valid.ListValue;
import com.bjtu.common.valid.group.AddGroupp;
import com.bjtu.common.valid.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 事件表
 * 
 * @author yangyalong
 * @email yangyalong@gmail.com
 * @date 2021-07-08 21:00:01
 */
@Data
@TableName("ev_event_info")
public class EventInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	@NotNull(message = "修改时必须指定事件id",groups = {UpdateGroup.class})
	@Null(message = "新增不能指定事件id",groups = {AddGroupp.class})
	private Long id;
	/**
	 * 事件类型
	 */
	@NotNull(message = "事件类型不能为空",groups = {AddGroupp.class,UpdateGroup.class})
	@ListValue(vals = {0,1,2,3,4} ,groups = {AddGroupp.class,UpdateGroup.class})
	private Integer eventType;
	/**
	 * 事件发生的时间
	 */
	@NotNull(message = "事件发生的时间不能为空",groups = {AddGroupp.class,UpdateGroup.class})
	private Date eventDate;
	/**
	 * 事件发生地点
	 */
	@NotNull(message = "事件发生的地点不能为空",groups = {AddGroupp.class,UpdateGroup.class})
	private Long roomNumber;
	/**
	 * 事件描述
	 */
	private String description;

}
